const express = require("express");
const router = express.Router();
const {
	getRecord,
	createRecord,
	deleteRecord,
	getMonthRecord,
	getYearRecord
} = require("../controllers/record");

// 获取所有列表
// router.get("/", getRecord);
router.route("/").post(createRecord);
router.post("/list", getRecord);
// 新增月份查詢
router.post("/month", getMonthRecord);
router.post("/year", getYearRecord);


// 删除
router.delete("/:id", deleteRecord); // 使用 ID 删除记录
module.exports = router;
